The present invention relates to a power supply with a built-in microcomputer for use in a computer system.
In general, when a power switch of a computer is turned off or the voltage of the computer's built-in battery decreases, a power off signal is sent to the computer from a power supply section and power supply to the computer is inhibited after a predetermined time. Within this predetermined time, the computer stops the current job and performs a save operation to save the contents of various registers, I/O statuses, memory contents, etc. so that it can start the interrupted job when powered again.
However, when the computer receives the power off signal while accessing an input/output (I/O) device, such as a disk drive that requires a long accessing time, the computer cannot perform the save operation until the access operation is completed. This is because when a recording-medium-driving motor of, for example, a hard disk drive is stopped while its head is accessing the recording medium rotating at a high speed, the head is likely to be crushed or damaged.
With the above restriction, therefore, the power supply would be stopped before the save operation is completed. As a result, when the power is supplied again to continue an interrupted program, the program may overrun.
In addition, detection of a low battery in a conventional battery-driven computer system is determined only by a battery voltage. With this method, however, when a load status changes, a low battery time cannot be accurately detected.